<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
      .red{
        color:red;

      }
      .f60{
        font-size: 60px;
      }
    </style>
  </head>
  <body>
    <div id="app">
      <h1>{{msg}}</h1>
      <p class="box" :class="{red:isRed, f60:isF60}">{{msg}}</p>
      <p class="box" :class="getClass">{{msg}}</p>
      <button @click="change">change</button>
    </div>

    <script src="../js/vue.js"></script>

    <script>
      const app = Vue.createApp({
        data() {
          return {
            msg: "fjad",
            red:"red",
            f60: "f60",
            isRed:true,
            isF60: true
          }
        },
        methods:{
          change(){
            this.isRed = !this.isRed
            this.isF60 = !this.isF60
          },
          getClass(){
            return {red:this.isRed,f60:this.isF60}
          }
        }
      }).mount("#app");
    </script>
  </body>
</html>